package mvc.view
{
	import flash.events.Event;
	import mx.events.FlexEvent;
	
	import mvc.view.components.ArtView;
	import org.puremvc.as3.patterns.mediator.Mediator;
	import org.tools.att.Att;
	public class ArtViewMediator extends Mediator
	{
        public static const NAME:String = 'ArtViewMediator';
        public function		ArtViewMediator		( viewComponent:Object ){onTrace('\t'+this);super( NAME, viewComponent );}
		private	function	onTrace(...args):void{Att.send('hTrace',String(Object(this).constructor),args);}
		override public function onRegister():void
		{
//			artView.message.text = "Hello from the newly registered "+NAME;
			artView.addEventListener(FlexEvent.HIDE, onHide);
		}
		protected function onHide(event:Event):void
		{
//			artView.message.text = "Hi there, its your old friend "+NAME;
//			artView.message.text ="<br />A Personal Touch<br />"+	"<br />Commissioned art could give a really exciting touch to your home or business.	Why not have an individual piece, customized to your home. Photos, images and art can be imitated or given a new twist. Tailor made pieces available on request. Please contact me for further consultation.";
			artView.removeEventListener(FlexEvent.HIDE, onHide);
		}   
        protected function get artView():ArtView{return viewComponent as ArtView;}
	}
	
}